//
//  SCPhotoModel.m
//  PhotoAlbum
//
//  Created by Chao Sheng on 2021/12/2.
//

#import "SCPhotoModel.h"

@implementation SCPhotoModel

- (void)setAsset:(PHAsset *)asset {
    _asset = asset;
    if ([[_asset valueForKey:@"isCloudPlaceholder"] boolValue]) {
        self.isICloud = YES;
    }
    
    CGSize size = CGSizeMake(_asset.pixelWidth, _asset.pixelHeight);
    self.imgSize = size;
    self.date = _asset.creationDate;
}

@end

@implementation SCPhotoDateModel

- (void)setDate:(NSDate *)date {
    _date = date;
    self.dateName = [SCPhotoTools transFromYMDTime:date];
}

@end
